package com.day0928.polymorphic;

public class Dog extends Pet {
    private String strain;

    public Dog(String name, int health, int love, String strain) {
        super(name, health, love);
        this.strain = strain;
    }

    @Override
    public void eat() {
        System.out.println("狗吃骨头，喜爱度增加");
        super.love += 20;
    }

    @Override
    public void toHospotial() {
        System.out.println("狗狗去医院，健康值增加");
        super.health += 10;
    }

    @Override
    public void show() {
        super.show();
        System.out.println("品种：" + this.strain);
    }

    public void jiefeipan(){
        System.out.println("狗接飞盘");
    }
}
